<%@ include file="config.jsp" %>

<html>
<head>
<title>MATRICULA</title>
</head>
    <body>
    	<div id="header">
			<%@ include file="header.jsp" %>
    	</div>	  
    	<div id="menu">
			<%@ include file="menu.jsp" %>
    	</div>	  
    	<div id="body">
    	<div class=error>
    		<ul>
		   		<c:forEach var="error" items="${errors}" > 
					<li>${error}</li>		   			
		   		</c:forEach>
    		</ul>
    	
    	
    	</div>
		<div class=message>${message}</div>
			<fieldset>
				<legend>Cadastro Matricula</legend>
				<form method="post" name="usuarioSistema" action="${pageContext.request.contextPath}/matriculaSalvar">
					<label>RA Aluno</label>
					<input type="text" name="raAluno" size="10" maxlength="10">
					
					<label>Codigo Curso</label>
					<input type="text" name="codigoCurso" size="10" maxlength="10">
					
					<label>Data Matricula</label>
					<input type="text" name=dataMatricula title="Ex. 21/11/2009" alt="Ex. 21/11/2009" size="10" maxlength="10">
					
					<input type="submit" value="gravar">
				</form>
			</fieldset>
			<div id="result">
					<table>
						<thead>
							<tr>
								<td>RA Aluno</td>
								<td>Codigo Curso</td>
								<td>Data Matricula</td>
								<td>Situacao</td>
								<td>Editar</td>
							</tr>
						</thead>
						<tbody>
					<c:forEach var="matricula" items="${matriculas}" > 
							<tr>
								<td>${matricula.raAluno}</td>
								<td>${matricula.codigoCurso}</td>
								<td><fmt:formatDate value="${matricula.dataMatricula}" pattern="dd/MM/yyyy"/></td>
								<td>${matricula.situacaoMatricula}</td>
								<td><a href="${pageContext.request.contextPath}/matriculaShowToEdit?raAluno=${matricula.raAluno}&codigoCurso=${matricula.codigoCurso}">Editar</a></td>
							</tr>
					</c:forEach>
						</tbody>
					</table>
				</div>
    	</div>	  
    	<div id="footer">
			<%@ include file="footer.jsp" %>
    	</div>	  
		      
    </body>  
</html>